<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=get_app_inf('appTitle')?> - User Manage</title>
<link href="/templates/Default/BackEnd/css/default.css" rel="stylesheet" type="text/css">
<script language="javascript" src="js/jquery.js"></script>
<script language="javascript">

 
$(function() {    
     $("#checkall").click(function() { 
	 	 s=$("#checkall").attr("checked");   
         $("input[name='user_id[]']").each(function() {    
             $(this).attr("checked", s);   
         });   
     });   
     
 });   
 </script> 
</head>

<body style="background-color:#FFF;margin:0">
<div id="container" >
<div id="nav" align="left">
				 <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="18" align="left" valign="middle">
					<img src="images/icon_home.jpg" width="16" height="15" align="absbottom" /> &nbsp;<strong>Location：</strong> 
                    <a href="<?=url("MBoAdmin","Main")?>">Home</a> > <a href="<?=url('MBoUser','')?>">Office Staff</a> > View Office Staff</td>
				  </td>
				  <td align="right">
				  <a href="#" onclick="window.location.reload();"><img src="images/btn_refresh.jpg" width="46" height="18" border="0"></a> 
                  <a href="#" onclick="window.history.back(-1);"><img src="images/btn_return.jpg" width="46" height="18" border="0"></a>
				  </td>
				  <td width="10"></td>
				  </tr>
                  <tr><td>
                  <div id="operate">			
			  <table width="100%"  border="0" cellspacing="0" cellpadding="0" align="left">
                <tr>
                  <td width="350" align="left">
				  <a href="<?=url($this->_controllerName,'ADD')?>"><img src="images/btn_add.jpg" width="58" height="21" border="0"></a>
				   
				  <a href="#" onclick="$('#frmList').submit();"><img src="images/btn_del.jpg" width="58" height="21" border="0"></a>
				   
				  </td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
              </table>
			</div>
                  </td></tr>
		 </table> 	
  </div>
			
			
			<!--Content Begin-->
		  <div id="content">
          <form name="frmList" id="frmList" method="post" action="<?=url($this->_controllerName,'RemoveSelected')?>">
			<table width="100%"  border="0" cellpadding="2" cellspacing="0" class="table">
			  <tr>
				<td width="2%" class="th"><input name="checkall" type="checkbox"  id="checkall"></td>
				<td width="15%" align="left" valign="middle" class="th">Name <img src="images/icon_sort_asc.jpg" width="7" height="11" align="absmiddle"></td>
				<td width="14%" align="center" valign="middle" class="th">Department <img src="images/icon_sort_desc.jpg" width="7" height="11" align="absmiddle"></td>
				<td width="13%" class="th">Phone</td>
				<td width="12%" class="th"> Mobile</td>
				<td width="13%" align="center" class="th"> Level Of Access</td>
				<td width="17%" class="th"> Email</td>
				<td width="14%" align="center" class="th">Action</td>
			  </tr>
              <?
              if($list['recoders']){
				  foreach($list['recoders'] as $key => $val){
			  ?>
			  <tr>
				<td class="td">
			    <input name="user_id[]" type="checkbox" value="<?=$val['user_id']?>">
				</td>
				<td class="td"><?=$val['username']?></td>
				<td align="center" class="td"><?=$val['department']['name']?></td>
				<td class="td"><?=$val['phone']?></td>
				<td class="td"><?=$val['mobile']?></td>
				<td align="center" class="td"><?=$val['level']['rolename']?></td>
				<td class="td"><?=$val['email']?></td>
				<td align="center" class="td"><a href="<?=url($this->_controllerName,'Edit',array('user_id' => $val['user_id']))?>">Edit</a> | <a href="<?=url($this->_controllerName,'Remove',array('user_id' => $val['user_id']))?>" onClick="javascript:if(confirm('Are you sure you want to delete this record?')) return true ; else return false;">Delete</a></td>
			  </tr>
              <? } } ?>
			   
		    </table>
            </form>
 
            <?=$list['PageBar']?>
  </div>
  
  <!--Content End-->
</div>
</body>
</html>